package com.example.study_thread.a_collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Demo3Collections {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        list.add(new Student("张三", 18));
        list.add(new Student("李四", 20));
        list.add(new Student("王五", 19));
        Collections.sort(list);
        System.out.println(list);

        List<String> list1 = Arrays.asList("张三", "李四", "王五");
        System.out.println(list1);
    }
}
